#define _CRT_SECURE_NO_WARNINGS 1

#if 0
#include <iostream>
#include <vector>
using namespace std;

void Test01()
{
	vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);

	for (size_t i = 0; i < v1.size(); i++)
	{
		cout << v1[i] << ' ';
	}
	cout << endl;

	vector<int>::iterator it1 = v1.begin();
	while (it1 != v1.end())
	{
		cout << *it1 << ' ';
		it1++;
	}
	cout << endl;

	for (auto e : v1)
	{
		cout << e << ' ';
	}
	cout << endl;

	v1.insert(v1.begin()+2, 0);
	for (auto e : v1)
	{
		cout << e << ' ';
	}
	cout << endl;

	v1.erase(v1.begin()+2);
	for (auto e : v1)
	{
		cout << e << ' ';
	}
	cout << endl;
}

int main()
{
	Test01();
	return 0;
}
#endif


#include "vector.h"


namespace My_Vector
{
	void Test01()
	{
		vector<int> v1;
		v1.push_back(1);
		v1.push_back(2);
		v1.push_back(3);
		v1.push_back(4);
		//v1.push_back(5);
		//v1.push_back(6);

		for (size_t i = 0; i < v1.size(); i++)
		{
			cout << v1[i] << " ";
		}
		cout << endl;

		//v1.pop_back();
		v1.Insert(v1.begin() + 1, 20);

		vector<int>::iterator it1 = v1.begin();
		while (it1 != v1.end())
		{
			cout << *it1 << " ";
			it1++;
		}
		cout << endl;
	}	

	void Test02()
	{
		vector<int> v1(10, 1);
		for (auto e : v1)
		{
			cout << e << " ";
		}
		cout << endl;

		vector<int> v2 = { 1,2,3,4,5,6,7,8,9 };
		for (auto e : v2)
		{
			cout << e << " ";
		}
		cout << endl;
	}	
}

int main()
{
	My_Vector::Test02();
	return 0;
}